package com.new2i.dao.mapper;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.new2i.model.ScreenDoctorEntity;

/**
 * 筛查医生ORM mapper
 * 
 * @author 2i
 * @since 2015/09/22
 *
 */
public interface ScreenDoctorMapper {

	/**
	 * 创建筛查医生绑定关系
	 * 
	 * @author 2i
	 * @since 2015/09/22
	 * @param scDoctor
	 * @return
	 */
	Integer insertScreenDoctor(ScreenDoctorEntity scDoctor);

	/**
	 * 通过tel查询医生的详细信息
	 * 
	 * @author 2i
	 * @since 2015/09/22
	 * @param tel
	 * @return
	 */
	HashMap<String, Object> getScreenDoctorByTel(@Param("tel") final String tel);

	/**
	 * 根据创建医生的id获取其所有的筛查医生
	 * 
	 * @author 2i
	 * @since 2015/09/2
	 * @param tel
	 * @param doctor_id
	 * @return
	 */
	List<HashMap<String, Object>> selectScreenDoctorList(@Param("doctor_id") final Integer doctor_id,
			@Param("start") final Integer start, @Param("offset") final Integer offset);

	/**
	 * 修改筛查医生的登录密码
	 * 
	 * @author 2i
	 * @since 2015/09/23
	 * @param sc_doctor_id
	 * @param password
	 * @param new_password
	 * @return
	 */
	Integer updateScreenDoctorPassword(@Param("sc_doctor_id") final Integer sc_doctor_id,
			@Param("password") final String password, @Param("new_password") final String new_password);
	  
	/**
	 * 移除（软删除）筛查医生账户
	 * 
	 * @author 2i
	 * @since 2015/09/23
	 * @param sc_doctor_id
	 * @param doctor_id
	 * @return
	 */
	Integer removeScreenDoctor(@Param("sc_doctor_id") final Integer sc_doctor_id,
			@Param("doctor_id") final Integer doctor_id);
	
	/**
	 * 删除筛查医生账户
	 * 
	 * @author 2i
	 * @since 2015/09/23
	 * @param sc_doctor_id
	 * @param doctor_id
	 * @return
	 */
	Integer deleteScreenDoctor(@Param("sc_doctor_id") final Integer sc_doctor_id,
			@Param("doctor_id") final Integer doctor_id);
}
